﻿using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LY.DataAccess.Repository
{
    public class ReferralsRepository : BaseRepository
    {
        //获取邀请注册列表
        public PagedList<Member_EX> GetReferralsLink(int id, PageView view)
        {
            string cols = @"[Name]
                              ,[Nickname]
                              ,[U_Referrals].[Id]
                              ,[U_Referrals].[MemberID]
                              ,[RefUserid]
                              ,[RefTime]
                              ,[RefIntegration]";
            string sqlWhere = " and [U_Referrals].[MemberID]=" + id;
            return base.PageGet<Member_EX>(view, cols, @"[U_Referrals] inner join [U_Member] on [U_Referrals].[RefUserid]=[U_Member].[ID]", sqlWhere, "[U_Referrals].[Id] ASC", "");
        }

      
    }
}
